Skip to content

Conversation

einalien
Copy link
Owner

@einalien einalien commented Nov 8, 2026 •

Summary

This PR introduces a manually triggered infrastructure destruction workflow for the TEST environment and updates the deployment pipeline to support recreating infrastructure from empty remote state.

Changes

  • Added .github/workflows/destroy.yml for TEST infrastructure destruction.
  • Restricted destruction to the TEST environment and manual execution from main.
  • Configured destruction in reverse dependency order: frontend before network.
  • Reused existing OpenStack credentials and Kubernetes remote-state configuration.
  • Added OpenTofu destroy planning with saved plans before execution.
  • Added checks to verify the correct TEST remote-state backend.
  • Added cleanup of temporary kubeconfig and plan files.
  • Added .opentofu-version for consistent OpenTofu version management.
  • Updated deploy.yml to allow TEST provisioning from empty remote state.
  • Preserved existing safeguards against destructive changes during normal deployments.

Workflow

Destruction:

Manual trigger
    ↓
Initialize TEST remote state
    ↓
Destroy TEST frontend
    ↓
Destroy TEST network

Recreation:

CI → Deploy TEST → Deploy STAGE

PROD remains skipped during automatically triggered deployments.

Validation

  • CI checks passed.
  • YAML and Bash syntax validated.
  • Destruction restricted to TEST.
  • Deployment configured to allow empty remote state.
  • Verify successful TEST destruction through GitHub Actions.
  • Verify successful TEST recreation after destruction.

Notes

The destruction workflow currently supports TEST only. STAGE and PROD destruction will be implemented separately after the TEST destruction and recreation lifecycle has been verified.

The existing deployment pipeline continues to block destructive infrastructure changes during normal deployments.

@einalien einalien self-assigned this Nov 8, 2026
@einalien einalien added the enhancement New feature or request label Nov 8, 2026
@einalien einalien changed the title Feat/cd destroy Feat/cd destroy test Nov 8, 2026
@einalien einalien merged commit 7c9ce75 into main Nov 8, 2026
1 check passed
@einalien einalien deleted the feat/cd-destroy branch November 8, 2026 17:55
Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant